﻿using System.IO;

namespace ZerAx.ObjectNotation
{
    public class ZonI32 : Zon
    {
        public override ZonType Type => ZonType.I32;
        public int data;

        public ZonI32() { }

        public ZonI32(int val)
        {
            data = val;
        }

        public override void Initialize(BinaryReader reader)
        {
            data = reader.ReadInt32();
        }

        public override void SerializeData(BinaryWriter writer)
        {
            writer.Write(data);
        }

        public override string ToString()
        {
            return data.ToString();
        }
    }
}
